<!-- Begin stats/users.tpl -->
<form method="post" action="?module=stats&action=team_global&submit=true">
{opentable}

{titlebar colspan=2 title=$lg->my_stats}
<tr>{$perio}</tr>
<tr>{$team}</tr>
<tr>
	<td class="sectiontableentry2" width="20%" align="right" valign="middle">{$lg->group}</td>
	<td class="sectiontableentry1" width="80%">
		<select name="gid">
			<option value=""></option>
			{foreach from=$smarty.session.groups item=group}	
				<option {if ($smarty.post.gid == $group)} selected {/if} value="{$group}" >{groupname id=$group}</option >
			{/foreach}
			</select>
	</td>		
</tr>
<tr>
	<td><input type="submit" class="button" value={$lg->validate} /></td>
</tr>
</table>
</form>

{opentable}
	{if is_array($t_month) }
		<tr>
			<td width ="5%"> </td>
		{foreach from=$t_month key=month item=s_month}
			<td class="sectiontableheader" align="center" colspan="3">{$month}</td>
		{/foreach}
		</tr>
		<tr>
			<td width ="5%"> </td>
		{foreach from=$t_month key=month item=s_month}
			<td class="sectiontableheader" align="center">NbTck</td>
			<td class="sectiontableheader" align="center">NbJh</td>
			<td class="sectiontableheader" align="center">Perf</td>
		{/foreach}
		</tr>
	{/if}

{foreach from=$t_group key=gid item=gname}

		<tr class="sectiontableheader" align="center">
			<td align="right" nowrap>{$gname}</td>
			{foreach from=$t_tot_grp[$gname] key=month item=s_tot_grp}
				<td>{$s_tot_grp.nbtck}</td>
				<td>{$s_tot_grp.nbjh} </td>
				<td>{$s_tot_grp.perf} </td>			
			{/foreach}
		</tr>	
		{foreach from=$t_edit[$gname] key=idusr item=t_dt_month}
			<tr  class="sectiontableentry2"  ><td >{username id=$idusr}</td>
			{foreach from=$t_dt_month key=value item=s_detail}
				<td align="center">{if $s_detail.nbtck > 0} {$s_detail.nbtck}{/if}</td>
				<td align="center">{if $s_detail.nbjh > 0}  {$s_detail.nbjh}{/if}</td>
				<td align="center">{if $s_detail.print} {$s_detail.perf} %{/if}</td>
			{/foreach}
			</tr>
			
			{foreach from=$t_grp_usr_iid_total[$gname][$idusr] key=iid item=t_itotal}
				<tr class="sectiontableentry1" ><td align="right"><a href="?module=issues&action=view&issueid={$iid}"><i>{$iid}</i></a></td>
				{foreach from=$t_itotal key=mth item=s_itotal}
					<td align="center"></td>
					<td align="center"></td>
					<td align="center">{if $s_itotal.print} {$s_itotal.perf} %{/if}</td>				
				{/foreach}
				</tr>
			{/foreach}			
		{/foreach}		
{/foreach}

	{foreach from=$t_edit[$idusr] key=name item=s_edit}
		<tr class="sectiontableentry2" align="center">
			<td align="right" nowrap><I>{$name}</I></td>
			{foreach from=$s_edit key=value item=l_edit}
				<td>{if $l_edit.nbtck > 0} {$l_edit.nbtck} {/if}</td>
				<td>{if $l_edit.nbjh > 0} {$l_edit.nbjh}{/if}</td>
				<td>{if $l_edit.nbtck  > 0} {$l_edit.perf} %{/if}</td>
			{/foreach}
		</tr>
		
		{foreach from=$t_detail[$name] key=value item=s_detail}
			<tr class="sectiontableentry1" align="center">
				<td align="right"><a href="?module=issues&action=view&issueid={$value}"><i>{$value}</i></a></td>
				{foreach from=$s_detail key=month item=s_mthdet}
				<td></td>
				<td></td>
				<td>{if $s_mthdet.perf  <> 'N/A' }{$s_mthdet.perf} %{/if}</td>
				{/foreach}
			</tr>
		{/foreach}			
	{/foreach}

	{if is_array($t_total) }
	<tr class="sectiontableheader" align="center">
		<td><B>{$lg->total}</B></td>
		{foreach from=$t_total key=value item=l_edit}
			<td>{$l_edit.nbtck}</td>
			<td>{$l_edit.nbjh}</td>
			<td>{$l_edit.perf}</td>
		{/foreach}	
	</tr>
	{/if}
	{if is_array($t_tteam)}
	<tr class="sectiontableheader" align="center">
		<td nowrap>{$lg->total} : {$tname}</td>
		{foreach from=$t_tteam key=value item=l_edit}
			<td>{$l_edit.nbtck}</td>
			<td>{$l_edit.nbjh}</td>
			<td>{$l_edit.perf}</td>
		{/foreach}	
	</tr>
	{/if}
</table>
<!-- End stats/users.tpl -->


